package com.administrator.scoreManageSys.entity.shiro;

import org.apache.shiro.authc.AuthenticationToken;

/**
 * JWT 令牌
 *
 * @author Administrator
 */

public class JwtToken implements AuthenticationToken {
    private static final long serialVersionUID = -790191688300000066L;

    /**
     * jwt token 令牌
     */
    private String jwt;

    /**
     * 客户端IP
     */
    private String host;

    public JwtToken(String jwt, String host) {
        this.jwt = jwt;
        this.host = host;
    }


    @Override
    public Object getPrincipal() {
        return this.jwt;
    }

    @Override
    public Object getCredentials() {
        return Boolean.TRUE;
    }

    public static long getSerialVersionId() {
        return serialVersionUID;
    }

    public String getJwt() {
        return jwt;
    }

    public void setJwt(String jwt) {
        this.jwt = jwt;
    }

    public String getHost() {
        return host;
    }

    public void setHost(String host) {
        this.host = host;
    }
}
